<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Match Detail</title>
		<link href="football.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/action.js" charset='utf-8'></script>
		<script src="lib/touch/sencha-touch.js" type="text/javascript"></script>
		<link href="lib/touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/util/parserUtil.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/util/NetworkUtil.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/OupeiObject.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/YapeiObject.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/LineupObject.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/AnalysisObject.js" charset="UTF-8" ></script>
		<script type="text/javascript" src="js/model/OupeiManager.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/AnalysisManager.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/YapeiManager.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/LineupManager.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/MatchEventObject.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/MatchStatObject.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/BetCompanyObject.js" charset="UTF-8" ></script>
		<script type="text/javascript" src="js/model/BetComanyManager.js" charset="UTF-8" ></script>
		<script type="text/javascript" src="js/model/YapeiManager.js" charset="UTF-8" ></script>
		<script type="text/javascript" src="js/model/MatchDetailManager.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/MatchEventView.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/OupeiView.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/YapeiView.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/LineupView.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/YapeiDetailView.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/AnalysisView.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/service/MatchService.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/GlobalVariable.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/match_detail.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/test.js" charset='utf-8'></script>
	</head>
	<body>
		<textarea id="noEvent-template" class="x-hidden-display">
            <div class="noEventdata"><span>暂无比赛事件相关数据</span></div>
        </textarea>
        
        <textarea id="noYapei-template" class="x-hidden-display">
            <div class="noYapeidata"><span>暂无相关数据</span></div>
        </textarea>
        
        <textarea id="noOupei-template" class="x-hidden-display">
            <div class="noYapeidata"><span>暂无相关数据</span></div>
        </textarea>
        
		<textarea id="event-template" class="x-hidden-display">
            <ul class="datalive">
  				<h2>比赛事件</h2>
  				<tpl for=".">
  				<li>
  					<div class="data_time">{minutes}'</div>
  					<div class={[this.homeAwayClass(values.homeAwayFlag)]}>
  						<tpl if="this.isHome(homeAwayFlag)">
  							<img src={[this.eventImage(values.type)]} width="22" height="20" align="absmiddle" />
  						</tpl> {player}  {type:this.eventString()}
  						<tpl if="this.isAway(homeAwayFlag)">
  							<img src={[this.eventImage(values.type)]} width="22" height="20" align="absmiddle" />
  						</tpl>
  						</div>
				</li>
				<div class="line11"> </div> 
				</tpl>
				
           	</ul>
        </textarea>
                
		<textarea id="stat-template" class="x-hidden-display">
			<div id="teamdata">
    			<div><img src="images/data_team_1@2x.png" width="305" height="28" /></div>
    			<ul class="ts">    	
    				<tpl for=".">
      				<li class="line">
      					<div class="p1">{[this.displayStat(values.type,values.homeValue)]}</div>
      					<div class="p2">{type:this.statString()}</div>
      					<div class="p1">{[this.displayStat(values.type,values.awayValue)]}</div>
      				</li>
      				</tpl>
    			</ul>
    			<div><img src="images/data_team_3@2x.png" width="305" height="10" /></div>
    		</div>			
		</textarea>
		
		<textarea id="oupei-stat-template" class="x-hidden-display">
			<div class="euodds">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
		      <tr class="o_title">
		        <td width="33%">&nbsp;</td>
		        <td width="21%">主胜</td>
		        <td width="28%">平</td>
		        <td width="18%">客胜</td>
		      </tr>
		      <tr>
		        <td bgcolor="#FFFFFF" class="eu_t">初盘最高值</td>
		        <td>{chupanWinMax}</td>
		        <td>{chupanDrawMax}</td>
		        <td>{chupanLostMax}</td>
		      </tr>
		      <tr class="ou_td_bg">
		        <td class="eu_t">即时最高值</td>
		        <td>{jishiWinMax}</td>
		        <td>{jishiDrawMax}</td>
		        <td>{jishiLostMax}</td>
		      </tr>
		      <tr>
		        <td bgcolor="#FFFFFF" class="eu_t">初盘最低值</td>
		        <td>{chupanWinMin}</td>
		        <td>{chupanDrawMin}</td>
		        <td>{chupanLostMin}</td>
		      </tr>
		      <tr class="ou_td_bg">
		        <td class="eu_t">即时最低值</td>
		        <td>{jishiWinMin}</td>
		        <td>{jishiDrawMin}</td>
		        <td>{jishiLostMin}</td>
		      </tr>
		      <tr>
		        <td bgcolor="#FFFFFF" class="eu_t">初盘平均值</td>
		        <td>{chupanWinAvg}</td>
		        <td>{chupanDrawAvg}</td>
		        <td>{chupanLostAvg}</td>
		      </tr>
		      <tr class="ou_td_bg">
		        <td class="eu_t">即时平均值</td>
		        <td>{jishiWinAvg}</td>
		        <td>{jishiDrawAvg}</td>
		        <td>{jishiLostAvg}</td>
		      </tr>
		    </table>
			</div> 
        </textarea>
		<textarea id="oupei-company-template" class="x-hidden-display">
			<div class="euodds">
			<tpl for=".">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
		      <tr class="o_title">
		        <td width="33%"><h2>{name}</h2></td>
		        <td width="21%">主胜</td>
		        <td width="28%">平</td>
		        <td width="18%">客胜</td>
		      </tr>
		      <tr>
		        <td bgcolor="#FFFFFF" class="eu_t">初盘</td>
		        <td>{chupanWin}</td>
		        <td>{chupanDraw}</td>
		        <td>{chupanLost}</td>
		      </tr>
		      <tr class="ou_td_bg">
		        <td class="eu_t">即时</td>
		        <td>{jishiWin}</td>
		        <td>{jishiDraw}</td>
		        <td>{jishiLost}</td>
		      </tr>
		    </table>
			</tpl>
			</div>
        </textarea>
		<textarea id="yapei-company-template" class="x-hidden-display">
			<div id="Asiaodds">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr class="o_title">
                    <td width="19%">公司</td>
                    <td width="35%">初盘</td>
                    <td width="37%">即时盘</td>
                    <td width="9%">变</td>
                </tr>
				<tpl for="dataArray">
				<tr id="abc" onclick="displayYapeiOddsDetail({[parent.type]}, {[values.betCompanyId]}),changbg()">
					<td bgcolor="#F0F6FC"><strong>{name}</strong></td>
        			<td><span style="color:#2D6EAE">{homeChupei}</span>&nbsp;&nbsp;<span style="color:#ff0000">{chupan}</span>&nbsp;&nbsp;<span style="color:#2D6EAE">{awayChupei}</span></td>
        			<td><span style="color:#2D6EAE">{homeJishi}</span>&nbsp;&nbsp;<span style="color:#ff0000">{jishi}</span>&nbsp;&nbsp;<span style="color:#2D6EAE">{awayJishi}</span></td>
        			<td><div onclick="displayYapeiOddsDetail({[parent.type]}, {[values.betCompanyId]})"><img src="images/ew.png" width="9" height="18" style="padding-top:10px" /></div></td>
				</tr>
				</tpl>
        </textarea>
		<textarea id="home-lineup-template" class="x-hidden-display">
            <ul id="homelist" class="teams1"> 
                <tpl for=".">
                    <li>
                        <h2>{.}</h2>
                    </li>
                </tpl>
            </ul>
        </textarea>
		<textarea id="home-reserve-template" class="x-hidden-display">
            <ul id="homeReservelist" class="teams3"> 
                <tpl for=".">
                    <li>
                        <h2>{.}</h2>
                    </li>
                </tpl>
            </ul>
        </textarea>
		<textarea id="away-lineup-template" class="x-hidden-display">
            <ul id="awaylist" class="teams2"> 
                <tpl for=".">
                    <li>
                        <h2>{.}</h2>
                    </li>
                </tpl>
            </ul>
        </textarea>
		<textarea id="away-reserve-template" class="x-hidden-display">
            <ul id="awayReservelist" class="teams4"> 
                <tpl for=".">
                    <li>
                        <h2>{.}</h2>
                    </li>
                </tpl>
            </ul>
        </textarea>
        <textarea id="nodata-template" class="x-hidden-display">
            <div class="nodata"><span>暂无阵容相关数据</span></div>
        </textarea>
		<textarea id="odds-detail-company-template" class="x-hidden-display"> 
			<div class="ac_left_title">赔率公司选择</div>       	
		    <ul id="ao_c" class="ac_bg">
		    	<tpl for="betCompanyList">
				    <li id="com-{#}-{[parent.type]}" class={[this.getSelectCompanyClass(parent.selectCompanyId, values.betId)]}><div onclick="displayYapeiOddsDetail({[parent.type]}, {[values.betId]})">{name}</div></li>
    			</tpl>
    		</ul>    		
        </textarea>
		<textarea id="odds-detail-template" class="x-hidden-display">
			<div class="ac_left_title">赔率变化</div>
		    <div id="odds-detail-div">
      			<table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tpl for=".">
					<tpl if="xindex % 2 === 0">
						<tr class="ac_r_bg">
					</tpl>
					<tpl if="xindex % 2 !== 0">
						<tr class="ac_r_bg2">
					</tpl>
          				<td width="60%">{homeOdds} {pankou:this.pankouString()} {awayOdds}</td>
          				<td width="40%" class="ac_time">{[this.pankouDateString(values.modifyDate)]}</td>
        			</tr>
        		</tpl>
      			</table>
		    </div>
        </textarea>
		
		<textarea id="analysis-template" class="x-hidden-display">
			<div id="fx">
<!--积分排名-->					
						<div id="pointsRankTitle" class="fx_title2" onclick="pointsAction()">积分排名</div>
							<div id ="table_points" style="display:none;">
								<div class="fx_2title" style="width:320px" ><span>{hometeam} 全场</span></div>	
								<table id="homePointsList" width="100%" border="0" cellpadding="0" cellspacing="0" >
									<tbody>
									<tr class="o_title">
	                    				<td>全场</td><td>赛</td><td>胜</td><td>平</td><td>负</td><td>得</td><td>失</td><td>净</td><td>得分</td><td>排名</td><td>胜率</td>
	                				</tr>
	                				
									<tpl for="homePointsArray" >
										<tr id="pointsRankData" class="fx_col">
										<td>{type}</td><td>{[this.getGames(values.win,values.draw,values.lose)]}</td><td>{win}</td><td>{draw}</td><td>{lose}</td><td>{score}</td><td>{score_against}</td><td>{[this.getScoreEarn(values.score,values.score_against)]}</td><td>{points}</td><td>{rank}</td><td>{winning_ratio}</td>
										</tr>
									</tpl>
									
									</tbody>
								</table>
								
								<div class="fx_2title" style="width:320px" ><span>{awayteam} 全场</span></div>	
								<table id="awayPointsList" width="100%" border="0" cellpadding="0" cellspacing="0" >
									<tbody>
									<tr class="o_title">
	                    				<td>全场</td><td>赛</td><td>胜</td><td>平</td><td>负</td><td>得</td><td>失</td><td>净</td><td>得分</td><td>排名</td><td>胜率</td>
	                				</tr>
									<tpl for="awayPointsArray">
										<tr id="pointsRankData2" class="fx_col">
										<td>{type}</td><td>{[this.getGames(values.win,values.draw,values.lose)]}</td><td>{win}</td><td>{draw}</td><td>{lose}</td><td>{score}</td><td>{score_against}</td><td>{[this.getScoreEarn(values.score,values.score_against)]}</td><td>{points}</td><td>{rank}</td><td>{winning_ratio}</td>
										</tr>
									</tpl>
									</tbody>
								</table>
								</li>
								</li>
							</div>
							
<!--对赛往绩-->				
						<div id="headtoheadTitle" class="fx_title2" onclick="headtoheadActoin()">对赛往绩</div>
							<div id ="table_headtohead" style="display:none;">
								<tpl for="groupHeadtoheadArray">
								<li>
									<table  width="100%" border="0" cellpadding="0" cellspacing="0" >
									<tr><td class="fx_2title" colspan="6">{[this.getYearFromDate(values)]}</td></tr>	
									<tr class="o_title">
										<td>日期</td>
										<td>赛事</td>
										<td width="90">主场</td>
										<td>比分</td>
										<td width="90">客场</td>
										<td>半场</td>
									</tr>
									<tpl for=".">
										<tr id="headData" class="fx_col">
										<td>{[this.getMonthDayFromDate(values.time)]}</td>
										<td>{league}</td>
										<td class="text_break">{[this.getShortName(values.home)]}</td>
										<td>{homePoints}-{awayPoints}</td>
										<td class="text_break">{[this.getShortName(values.away)]}</td>
										<td>{homeHalfPoints}-{awayHalfPoints}</td>
										</tr>
									</tpl>
									
									</table>
								</li>
								</tpl>
							</div>
<!--近期战绩-->					
						<div id="recordsTitle" class="fx_title2" onclick="recordsAction()">近期战绩</div>
							<div id="table_records" style="display:none;">
									<table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td class="fx_2title" colspan="6">{hometeam}</td></tr>
										<tr class="o_title">
											<td width="65">日期</td>
											<td width="55">赛事</td>
											<td width="70">主队</td>
											<td width="30">比分</td>
											<td width="70">客队</td>
											<td width="30">盘路</td>
										</tr>
										<tpl id="tpl_homeRecordArray" for="homeRecordArray">
										<tr id="recordsData" class="fx_col">
											<td class="text_break">{[this.formateDate(values.time)]}</td>
											<td class="text_break">{league}</td>
											<td class={[this.nameColor(parent.hometeam,values.home)]}>{[this.getShortName(values.home)]}</td>
											<td>{homePoints}-{awayPoints}</td>
											<td class={[this.nameColor(parent.hometeam,values.away)]}>{[this.getShortName(values.away)]}</td>
											<td><span class={[this.oddsColor(values.odds)]}>{odds}</span></td>
										</tr>
										</tpl>
									</table>
								
									<table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td class="fx_2title" colspan="6">{awayteam}</td></tr>
										<tr class="o_title">
											<td width="65">日期</td>
											<td width="55">赛事</td>
											<td width="70">主队</td>
											<td width="30">比分</td>
											<td width="70">客队</td>
											<td width="30">盘路</td>
										</tr>
										<tpl for="awayRecordArray">
										<tr class="fx_col">
											<td class="text_break">{[this.formateDate(values.time)]}</td>
											<td class="text_break">{league}</td>
											<td class={[this.nameColor(parent.awayteam,values.home)]}>{[this.getShortName(values.home)]}</td>
											<td>{homePoints}-{awayPoints}</td>
											<td class={[this.nameColor(parent.awayteam,values.away)]}>{[this.getShortName(values.away)]}</td>
											<td><span class={[this.oddsColor(values.odds)]}>{odds}</span></td>
										</tr>
										</tpl>
									</table>
							</div>							
					</td>
				</tr>
<!--未来三场-->					
						<div id="near3gamesTitle" class="fx_title2" onclick="near3gamesAction()">未来三场</div>
							<div id="table_near3games" style="display:none;">
									<table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td class="fx_2title" colspan="4">{hometeam}</td></tr>
										<tr class="o_title">
											 <td width="29%">时间</td>
    										 <td width="20%">赛事</td>
										     <td width="36%">对阵</td>
										     <td width="15%">间隔</td>
										</tr>
										<tpl for="homeNear3GamesArray">
										<tr id="Near3GamesData" class="fx_col">
											<td>{[this.formateDate(values.time)]}</td><td>{league}</td><td>{[values.home==parent.hometeam ? values.away : values.home]}</td><td>{offsetday}</td>
										</tr>
										</tpl>
									</table>
									<table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td class="fx_2title" colspan="4">{awayteam}</td></tr>
										<tr class="o_title">
											<td>时间</td><td>赛事</td><td>对阵</td><td>间隔</td>
										</tr>
										<tpl for="awayNear3GamesArray">
										<tr class="fx_col">
											<td>{[this.formateDate(values.time)]}</td><td>{league}</td><td>{[values.home==parent.awayteam ? values.away : values.home]}</td><td>{offsetday}</td>
										</tr>
										</tpl>
									</table>
							</div>						
						
<!--心水推荐-->				
						<div id="recommendTitle" class="fx_title2" onclick="recommendAction()">心水推荐</div>	
							<div id="table_recommend" style="display:none;">
									<tpl for="recommendArray">
									<table width="100%" border="0" cellpadding="0" cellspacing="0" >
										<tr class="o_title">
											<td>球队</td><td>近期走势</td><td>盘路输赢</td>
										</tr>
										<tr class="fx_col">
											<td>{home}</td><td>{homeTrend}</td><td>{homeOdds}</td>
										</tr class="fx_col">
										<tr class="fx_col">
											<td>{away}</td><td>{awayTrend}</td><td>{awayOdds}</td>
										</tr>
										<tr class="fx_col"><td colspan="3">{analysis}</td></tr>
									</table>
									
								</tpl>
							</div>						
		</div>	
		</textarea>
	</body>
</html>